package values.building
{
/**
 * FinalBuildFriendCost
 * @author jliang
 *
 */
public class FinalBuildFriendCost
{
	protected var _positions:Array;
	
	public function get positions():Array
	{
		return _positions;
	}
	
	[Data(type="mapping", 
    		  mapping="position", 
    		  ref="values.building.FinalBuildFriendCostPositionValue",
    		  way="one_to_more")]
	public function set positions(value:Array):void
	{
		_positions = value.sortOn("index", Array.NUMERIC);
	}
	
	public function getPositionByIndex(index:int):FinalBuildFriendCostPositionValue
	{
		return positions[index];
	}
}
}